package com.coolwen.spring.speciality.config;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;
import org.springframework.stereotype.Component;

/**
 * @author CoolWen
 * @version 2020-04-09 8:36
 */
@Component
public class HelloConditionCheck implements Condition {
    @Override
    public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) {
        return conditionContext.getRegistry().containsBeanDefinition("a");
    }
}
